home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 1 / Gold Medal Software Volume 1 (Gold Medal) (1994).iso / prog / makebutt.arj / MAKEBUTT.PRG < prev    next >
Encoding:
Text File  |  1993-09-04  |  1.2 KB  |  30 lines

  1. /// This is an example program to make 3-D sizeable buttons anywhere on 
  2. /// the screen in any color with a optional shadow. The buttons are sizeable
  3. /// depending on the length of the text. For Example: if your text was 20 
  4. /// characters long the button will be 20 characters long. 
  5.  
  6. SETBLINK(.F.)
  7. SETCOLOR("0/15")
  8. CLEAR SCREEN
  9.  
  10. MAKEBUTTON(6,27," Edit Directories  ","15/3",1,"15/0")
  11. MAKEBUTTON(8,27," Sort Directories  ","15/7",1,"15/0")
  12. MAKEBUTTON(10,27," DBase FileFinder  ","15/7",1,"15/0")
  13. MAKEBUTTON(12,27," Edit Directories  ","15/7",1,"15/0")
  14. MAKEBUTTON(14,27," Edit Directories  ","15/7",1,"15/0")
  15. MAKEBUTTON(16,27," Edit Directories  ","15/7",1,"15/0")
  16. MAKEBUTTON(18,27," Run Ext. Programs ","15/7",1,"15/0")
  17.  
  18.  
  19.     //////////////////////////////////////////////////////////
  20.   /// Draw Menu Buttons & Optional Shadows Around Buttons ///
  21. ////////////////////////////////////////////////////////////
  22. FUNCTION MAKEBUTTON(XLOC,YLOC,TEXT,TEXTCOLOR,SHADOW,SHADOWCOLOR)
  23.  
  24. @ XLOC,YLOC SAY TEXT COLOR TEXTCOLOR
  25. IF SHADOW = 1
  26.         @ XLOC+1,YLOC+1 SAY REPLICATE (CHR(220),LEN(TEXT)) COLOR SHADOWCOLOR
  27.         @ XLOC,YLOC+LEN(TEXT) SAY CHR(223) COLOR SHADOWCOLOR
  28. ENDIF
  29. RETURN
  30.